<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //比较两个数的大小
        var num1 = 1000;
        var num2 =20;
        console.log(num1>num2?num1:num2)
        //判断整数范围
        var num = prompt("请输入数字");
        if (num % 1 ==0 &&  num > 0) {
        console.log("这是个大于零的整数");
        } else if (num % 1 ==0 &&  num == 0) {
        console.log("这是等于的整数");
        } else if (num % 1 ==0 && num < 0) {
        console.log("这是个小于零的整数");
        }
        else{
            console.log('请输入整数数字')
        }
        // 判断奇数还是偶数
        var n = -7;
        if(n%2==0){
            console.log('n是偶数')
        }else{
            console.log('n是奇数')
        }
        //观察测试者体重是否合适
        var height = 180;
        var weight = 150;
        if((height-108)*2 - weight <= 10){
            console.log('体重合适')
        }
        else if( weight -(height-108)*2  >= 10){
            console.log('体重合适')
        }
        else{
            console.log('体重不合适')
        }
        
    </script>
</body>
</html>